<template>
  <div class="artist-box">
    <div class="box" v-for="item in artists" :key="item.id">
      <div class="img">
        <el-image :src="item.img1v1Url" alt="" lazy>
          <div slot="placeholder" class="image-slot">
            <div class="dot" v-loading="loading"></div>
          </div>
        </el-image>
        <div class="msk"></div>
      </div>

      <div class="artist-bottom">
        <a href="javascript:;" class="name">{{ item.name }}</a>
        <div class="icon"></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    artists: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {
      loading: true
    }
  }
}
</script>

<style lang="scss" scoped>
.image-slot {
  width: 130px;
  height: 130px;
}
.dot {
  width: 100%;
  height: 100%;
}
.box {
  width: 130px;
  height: 154px;
}
.artist-box {
  width: 100%;
  display: flex;
  flex-flow: wrap;
  justify-content: space-between;
  .img {
    width: 130px;
    height: 130px;
    position: relative;
    .el-image {
      width: 100%;
      height: 100%;
    }
    .msk {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: url('https://s2.music.126.net/style/web2/img/coverall.png?af35df4591e085956d5858cc1f9960da')
        no-repeat;
      background-position: 0 -680px;
    }
    &:hover {
      cursor: pointer;
    }
  }
}
.icon {
  width: 18px;
  height: 18px;
  background: url('https://s2.music.126.net/style/web2/img/icon.png?e3b35dd9ab5d5a0f4188e020e832a355')
    no-repeat 0 9999px;
  background-position: 0 -740px;
  &:hover {
    cursor: pointer;
  }
}
.artist-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
}
a {
  color: #000;
  text-decoration: none;
  &:hover {
    text-decoration: underline;
  }
}
.box {
  margin-top: 20px;
}
</style>
